Software Development
Working with HTTP Requests in Python
Python Requests: HTTP Requests with Python

Python Requests: HTTP Requests with Python

Course Number:
it_pywhpydj_01_enus
Lesson Objectives

Python Requests: HTTP Requests with Python

  • discover the key concepts covered in this course
  • install the Python Requests package and set up a workspace
  • make a GET request and explore the response object returned, which includes a status code and headers
  • parse a response body containing JSON-formatted data
  • invoke a GET request that includes parameters
  • use the Requests package to construct a POST request that includes a set of key-value pairs to be submitted to a server
  • submit data to pastebin.com using their APIs and with a POST request
  • retrieve metadata for a resource by means of a HEAD request
  • invoke PUT, OPTIONS, and DELETE requests and recognize the specific use case for each of them
  • set the headers in an HTTP Request and parse the headers in a Response object
  • define the encoding format for the contents in an HTTP Response and download and handle binary content such as images
  • identify the format of an HTTP Response and parse the data accordingly
  • handle successful and unsuccessful HTTP requests according to the status code of the response
  • recognize when an HTTP request has triggered a redirect, explore the redirect history, and configure the read and connect timeout values for a request
  • catch errors that are thrown by HTTP requests by using the exceptions module in the Requests package
  • compare the GET and HEAD requests, summarize the PUT and DELETE requests, and view the redirect history following a GET request

Overview/Description

Discover how to use the Python Requests package to make different kinds of HTTP requests in order to request and submit data. Explore GET, POST, PUT, and other forms of requests and how to handle the responses.



Target

Prerequisites: none

Close Chat Live